<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {% block title %}
    <title>商品管理</title>
    {% endblock %}
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap.css" rel="stylesheet">
</head>
<body>
{% block body %}
    <div class="container-fluid">
        <div class="row bg-dark">
            <div class="row d-flex justify-content-between">
                <div class="col-6 d-flex align-items-center">
                    {% if g.user %}
                    <span class="text-white">欢迎回来 {{ g.user.nickname }}</span>&nbsp;&nbsp;
                    <a class="text-danger" href="{{ url_for('accounts.logout') }}">退出登录</a>
                    {% endif %}
                </div>
                <form class="col-4 g-3" action="{{ url_for('mall.product_list', page=1) }}">
                    <div class="row">
                        <div class="col-9">
                            <input type="text" name="name" class="form-control" placeholder="关键词">
                        </div>
                        <div class="col-3">
                            <button type="submit" class="btn btn-primary mb-3">搜索</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div class="row">
            <div class="col-3">
                <div class="row">
                    {% block sidebar %}
                        {% include 'base/sidebar.html' %}
                    {% endblock %}
                </div>
            </div>
            <div class="col-9">
                {% for cat,msg in get_flashed_messages(with_categories=True) %}
                <div class="alert alert-{{ cat }}">{{ msg }}</div>
                {% endfor %}
                {% block content %}
                    <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">...</div>
                {% endblock %}
            </div>
        </div>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/js/bootstrap.js"></script>
    {% block extrajs %}{% endblock %}
{% endblock %}
</body>
</html>